package com.rbac.api.controller.request;


import com.rbac.api.constant.AdminConstant;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

///分页公共参数
public class PostPageCommonParamRequest {



    //当前页数
    @Min(value = 1,message = "post.common.page.index.value.min.fail")
    protected Integer pageIndex;
    //显示数据条数
    @Max(value = 100,message = "post.common.page.size.value.max.fail")
    protected Integer pageSize;


    public Integer getPageSize() {
        return (pageSize == null)? AdminConstant.DEFAULT_PAGE_SIZE_VALUE : pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageIndex() {
        return (pageIndex == null) ? AdminConstant.DEFAULT_PAGE_INDEX_VALUE : pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }
}
